Skip to content

查询及更新K12离线刷脸用户信息

刷脸用户信息查询接口

请求参数类型描述
organization_idstring机构ID
out_user_idstring商户刷脸用户ID
php
$instance->v3->offlinefacemch->organizations->_organization_id_->users->outUserId->_out_user_id_->getAsync([
  'organization_id' => '',
  'out_user_id' => '',
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/offlinefacemch/organizations/{organization_id}/users/out-user-id/{out_user_id}')->getAsync([
  'organization_id' => '',
  'out_user_id' => '',
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/offlinefacemch/organizations/{organization_id}/users/out-user-id/{out_user_id}']->getAsync([
  'organization_id' => '',
  'out_user_id' => '',
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->offlinefacemch->organizations->_organization_id_->users->outUserId->_out_user_id_->get([
  'organization_id' => '',
  'out_user_id' => '',
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/offlinefacemch/organizations/{organization_id}/users/out-user-id/{out_user_id}')->get([
  'organization_id' => '',
  'out_user_id' => '',
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/offlinefacemch/organizations/{organization_id}/users/out-user-id/{out_user_id}']->get([
  'organization_id' => '',
  'out_user_id' => '',
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
use_idstring刷脸用户ID
out_user_idstring商户刷脸用户ID
organization_idstring机构ID
user_namestring姓名
user_typestring用户类型
STUDENT | STUFF 枚举值之一
student_infoobject学生信息
class_namestring班级名
staff_infoobject职工信息
occupationstring职业
statusstring用户状态
NORMAL | DISABLED 枚举值之一
contract_statestring签约状态
NOT_CONTRACTED | TERMINATED | CONTRACTED 枚举值之一
face_image_okboolean人脸图片上传状态
contract_idstring签约ID

参阅 官方文档

刷脸用户信息修改接口

若修改了学生姓名、班级、手机号时,需调用接口同步给微信侧,否则可能导致小助手上记录欠款的学生姓名、班级与实际不符合以及学生刷脸验证手机号时无法通过。

请求参数类型描述
organization_idstring机构ID
out_user_idstring商户刷脸用户ID
jsonobject声明请求的JSON数据结构
user_namestring姓名
user_typestring用户类型
STUDENT | STUFF 枚举值之一
student_infoobject学生信息
class_namestring班级名
staff_infoobject职工信息
occupationstring职业
statusstring状态
NORMAL | DISABLED 枚举值之一
phonestring手机号
headersobject声明请求的头参数
Wechatpay-Serialstring平台公钥ID/平台公钥证书序列号
php
$instance->v3->offlinefacemch->organizations->_organization_id_->users->outUserId->_out_user_id_->patchAsync([
  'organization_id' => '',
  'out_user_id' => '',
  'json' => [
    'user_name'    => '',
    'user_type'    => 'STUDENT',
    'student_info' => [
      'class_name' => '',
    ],
    'staff_info'   => [
      'occupation' => '',
    ],
    'status'       => 'NORMAL',
    'phone'        => '',
  ],
  'headers' => [
    'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r($response->getStatusCode() === 204);
})
->wait();
php
$instance->chain('v3/offlinefacemch/organizations/{organization_id}/users/out-user-id/{out_user_id}')->patchAsync([
  'organization_id' => '',
  'out_user_id' => '',
  'json' => [
    'user_name'    => '',
    'user_type'    => 'STUDENT',
    'student_info' => [
      'class_name' => '',
    ],
    'staff_info'   => [
      'occupation' => '',
    ],
    'status'       => 'NORMAL',
    'phone'        => '',
  ],
  'headers' => [
    'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r($response->getStatusCode() === 204);
})
->wait();
php
$instance['v3/offlinefacemch/organizations/{organization_id}/users/out-user-id/{out_user_id}']->patchAsync([
  'organization_id' => '',
  'out_user_id' => '',
  'json' => [
    'user_name'    => '',
    'user_type'    => 'STUDENT',
    'student_info' => [
      'class_name' => '',
    ],
    'staff_info'   => [
      'occupation' => '',
    ],
    'status'       => 'NORMAL',
    'phone'        => '',
  ],
  'headers' => [
    'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r($response->getStatusCode() === 204);
})
->wait();
php
$response = $instance->v3->offlinefacemch->organizations->_organization_id_->users->outUserId->_out_user_id_->patch([
  'organization_id' => '',
  'out_user_id' => '',
  'json' => [
    'user_name'    => '',
    'user_type'    => 'STUDENT',
    'student_info' => [
      'class_name' => '',
    ],
    'staff_info'   => [
      'occupation' => '',
    ],
    'status'       => 'NORMAL',
    'phone'        => '',
  ],
  'headers' => [
    'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
  ],
]);
print_r($response->getStatusCode() === 204);
php
$response = $instance->chain('v3/offlinefacemch/organizations/{organization_id}/users/out-user-id/{out_user_id}')->patch([
  'organization_id' => '',
  'out_user_id' => '',
  'json' => [
    'user_name'    => '',
    'user_type'    => 'STUDENT',
    'student_info' => [
      'class_name' => '',
    ],
    'staff_info'   => [
      'occupation' => '',
    ],
    'status'       => 'NORMAL',
    'phone'        => '',
  ],
  'headers' => [
    'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
  ],
]);
print_r($response->getStatusCode() === 204);
php
$response = $instance['v3/offlinefacemch/organizations/{organization_id}/users/out-user-id/{out_user_id}']->patch([
  'organization_id' => '',
  'out_user_id' => '',
  'json' => [
    'user_name'    => '',
    'user_type'    => 'STUDENT',
    'student_info' => [
      'class_name' => '',
    ],
    'staff_info'   => [
      'occupation' => '',
    ],
    'status'       => 'NORMAL',
    'phone'        => '',
  ],
  'headers' => [
    'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
  ],
]);
print_r($response->getStatusCode() === 204);
返回字典类型描述
空字符串(无返回内容)

参阅 官方文档

Published on the GitHub by TheNorthMemory